x86: Clean up wbinvd usage in cpu offline paths.
authorKeir Fraser <keir@xen.org>
Fri, 11 Mar 2011 17:27:25 +0000 (17:27 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 11 Mar 2011 17:27:25 +0000 (17:27 +0000)
No need to wbinvd before HLT (entering C1) as the processor continues
to participate in the full cache coherency protocol in this sleep
state.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/acpi/cpu_idle.c
xen/arch/x86/domain.c

index 3f947841d0a1321ae916b76161681f3af4fd08c3..a2368d39b1732fa9ebdb865791a7141e222e4db2 100644 (file)
@@ -567,8 +567,8 @@ static void acpi_dead_idle(void)
     if ( cx->entry_method == ACPI_CSTATE_EM_FFH )
     {
         /*
-         * cache must be flashed as the last ops before cpu going into dead,
-         * otherwise, cpu may dead with dirty data breaking cache coherency,
+         * Cache must be flushed as the last operation before sleeping.
+         * Otherwise, CPU may still hold dirty data, breaking cache coherency,
          * leading to strange errors.
          */
         wbinvd();
@@ -593,7 +593,6 @@ static void acpi_dead_idle(void)
     }
 
 default_halt:
-    wbinvd();
     for ( ; ; )
         halt();
 }
index a024e198e90b4bacdf1ee975c0becbb8ee2aaf37..b859cd576fac6a9756af2e40bc2e791bf630bbc3 100644 (file)
@@ -93,12 +93,6 @@ static void default_idle(void)
 
 static void default_dead_idle(void)
 {
-    /*
-     * cache must be flashed as the last ops before cpu going into dead,
-     * otherwise, cpu may dead with dirty data breaking cache coherency,
-     * leading to strange errors.
-     */
-    wbinvd();
     for ( ; ; )
         halt();
 }